<html>
    <head>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/engine.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/util.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/interface/Batch.js'></script>
	
	<title>Greeting</title>
	<script language="JavaScript">
	    function method1(name) {
		Batch.method1(name, function(data) {
		    setText(data);
		});
	    }
	    function method2(name) {
		Batch.method2(name, function(data) {
		    setText(data);
		});
	    }
	    function method3(name) {
		Batch.method3(name, function(data) {
		    setText(data);
		});
	    }
	    function batch() {
		DWREngine.beginBatch();
		method1("1");
		method2("2");
		method3("3");
		DWREngine.endBatch();
	    }
	    function setText(msg) {
		var ele = document.getElementById("text");
		ele.value = ele.value + msg + "\n";
	    }
	</script>
    </head>
    
    <body >
	
	<br/>
	<li><input type="button" value="method1" onclick="method1('1')"/></li>
	<li><input type="button" value="method2" onclick="method2('2')"/></li>
	<li><input type="button" value="method3" onclick="method3('3')"/></li>
	<li><input type="button" value="batch" onclick="batch()"/></li>
	<textarea id="text" rows="10" cols="50"></textarea>
    </body>
</html>
